package demo2;

public class OutClass {
    public int data1 = 2;
    public int data2 = 3;

    class InnerClass{
        public int data3 = 4;

        public void test(){
            //使用外部类名.this.成员变量名进行访问
            System.out.println(OutClass.this.data1);
        }
    }
}
